

export const actions_getNewsList=data=>{
        return {
            type:"GETNEWS",
            payload:data
        } 
}

export function fetchList(){
        return (dispatch)=>{
            var url="http://10.31.160.78:3000/news/data/5aa72fa0289fe048b0e48914";
            return  fetch(url).then((res)=>{
                return res.json();
            })
            .then((data)=>{                
                dispatch(actions_getNewsList(data));
            });
        }
}
